NAND flash memory, as well as other types of non-volatile memories (“NVMs”), are commonly used for mass storage. For example, consumer electronics such as portable media players often include flash memory to store music, videos, and other media.
Some systems can provide metadata journaling in order to keep track of updates made to files and folders before committing those updates to a file system. Metadata journaling can facilitate system recovery from power failures, device failures, and other unexpected events.
Conventionally, a system may provide for metadata journaling on top of a NVM device. While this may provide some data recovery capabilities, such a configuration may be unable to ensure data consistency in response to unexpected device failures. That is, after the system recovers from a device failure, the system may fall into an incoherent state where some portions of a file may contain old data and other portions of the file may contain updated data.